<?php

class RssController extends Controller
{
    public function init() {
        return parent::init();
    }
    
    public function filters()
    {
        header("Content-Type: text/xml");
    }

    public function actionSitemapXML()
    {
        $categories = Category::All();
        $articles = Articles::All();
        $this->renderPartial('xml', array(
            'categories' => $categories,
            'articles' => $articles
        ));
        Yii::app()->end();
    }

    public function actionSitemapHTML()
    {
        $categories = Category::All();
        $articles = Articles::All();
        $this->renderPartial('html', array(
            'categories' => $categories,
            'articles' => $articles
        ));
        Yii::app()->end();
    }
}
